package com.jshx.sz.gdjt.activity;

import java.util.Timer;
import java.util.TimerTask;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import com.jshx.sz.gdjt.R;

/**
 * 欢迎界面
 * @author caxiang
 * @time 2013-08-20
 */
public class WelcomeActivity extends SuperActivity 
{
	/**
	 * 页面跳转时间
	 */
	private final long TIMERTIME = 3000;
	
	/**
	 * 定时�?
	 */
	private Timer timer;
	
	/**
	 * 定时执行的任务对�?
	 */
	private TimerTask task;
	
	/**
	 * 页面句柄
	 */
	private Handler handler = new Handler(){
		@Override
		public void handleMessage(Message msg) 
		{
			int what = msg.what;
			super.handleMessage(msg);
		}
	};
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.welcome_activity);
		TAG = "WelcomeActivity";
		//设置显示图片
		timer = new Timer();
		task = new TimerTask()
		{
			@Override
			public void run() {
				
				startActivity(new Intent(WelcomeActivity.this
						, MainActivity.class));
				WelcomeActivity.this.finish();
			}
		};
		timer.schedule(task, TIMERTIME);
	}
	
	@Override
	protected void onDestroy() 
	{
		super.onDestroy();
	}
}
